import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:myapp/app/modules/profile/views/profile_history_layout.dart';
import 'package:myapp/app/modules/profile/views/profile_operate_layout.dart';

import 'package:myapp/app/modules/profile/views/profile_user_layout.dart';
import 'package:myapp/app/routes/app_pages.dart';
import 'package:myapp/app/theme/app_color.dart';
import 'package:myapp/app/widget/profile_bar.dart';

//todo 参数太多了，偷个懒，本地写死数据
class ProfileView extends StatefulWidget {
  @override
  _ProfileViewState createState() => _ProfileViewState();
}

class _ProfileViewState extends State<ProfileView> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: AppColor.hex_ddd20,
      appBar: ProfileBar(),
      body: SingleChildScrollView(
        child: Center(
          child: Column(children: [
            ProfileUserLayout(margin: EdgeInsets.symmetric(vertical: 10, horizontal: 16),),
            ProfileOperateLayout(margin: EdgeInsets.symmetric(vertical: 10, horizontal: 16),),
            ProfileHistoryLayout(margin: EdgeInsets.symmetric(vertical: 10, horizontal: 16),),
            Padding(padding: EdgeInsets.all(10), child: TextButton(child: Text("控件案例"), onPressed: (){
              Get.toNamed(Routes.WIDGETLIST);
            },),),
            Padding(child: Text("下面偷懒，不写了", textAlign: TextAlign.center,), padding: EdgeInsets.only(top: 40),)
          ],),
        ),
      ),
    );
  }
}
